sort an array of 0s 1s 2s